import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-10-31
 * Time: 21:59
 */
public class test_1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            char[] chars= String.valueOf(in.nextInt()).toCharArray();
            int n=chars.length;
            char[] ret=new char[n];
            for (int i = 0; i < n; i++) {
                int num =Integer.parseInt(String.valueOf(chars[i]));

                if (num%2==0){
                    ret[i]='0';
                }else {
                    ret[i]='1';
                }
            }
            System.out.println(Integer.parseInt(new String(ret)));
        }
    }
}
